﻿@model Dexter.Web.Mvc.ViewModel.Backoffice.ViewsData.AccountController.AccountCreateUserViewData
@{
	ViewBag.Title = "CreateUser";
	Layout = "~/Areas/Admin/Views/Shared/_BackOffice.cshtml";
}

<section class="grid_12">
	@if (!ViewData.ModelState.IsValid) {
		<ul class="message error no-margin">
			@Html.ValidationSummary()
		</ul>	
	}

	<div class="block-border">
		<form method="post" id="simple_form" class="block-content form" action="#">
			<h1>Create User</h1>

			@Html.AntiForgeryToken()

			<fieldset class="grey-bg required">
				<legend>Required Fields</legend>

				<p>
					<label for="simple-required">Username</label>
					@Html.TextBoxFor( x => x.User.Username, new { @class = "full-width", placeholder = "Write here the username" } )
				</p>

				<p>
					<label for="simple-required">Password</label>
					@Html.PasswordFor(x => x.User.Password, new { @class = "full-width", placeholder = "Write here the password of the user" })
				</p>

				<p>
					<label for="simple-required">Confirm Password</label>
					@Html.PasswordFor( x => x.User.ConfirmPassword, new { @class = "full-width", placeholder = "Write here the password of the user" } )
				</p>

				<p>
					<label for="simple-required">Email</label>
					@Html.TextBoxFor(x => x.User.Email, new { @class = "full-width", placeholder = "Write here the password of the user" })
				</p>

				<p>
					<label for="simple-required">Confirm Email</label>
					@Html.TextBoxFor( x => x.User.ConfirmEmail, new { @class = "full-width", placeholder = "Write here the password of the user" } )
				</p>

			</fieldset>

			<fieldset class="grey-bg">
				<legend>Roles</legend>
				<p>
					<label for="table-display" style="display:inline">Administrator</label>
					@Html.CheckBoxFor( x => x.User.IsAdministrator, new { @class = "mini-switch"} )
					&nbsp;
					<label for="table-display" style="display:inline">Moderator</label>
					@Html.CheckBoxFor( x => x.User.IsModerator, new { @class = "mini-switch"} )
					&nbsp;
					<label for="table-display" style="display:inline">Moderator</label>
					@Html.CheckBoxFor( x => x.User.IsPoster, new { @class = "mini-switch"} )
					&nbsp;
				</p>

			</fieldset>

			<p class="input-with-button">
				<button type="submit">Save</button>
			</p>
		
		</form>

	</div>

</section>

